Kwik.Page.include("Kwik.Collections.Hashtable.js");
Kwik.Page.include("Kwik.Data.Column.js");
Kwik.Page.include("Kwik.Data.Table.js");

/**
* Data column collection
* @extends Kwik.Collection.Hashtable
* @requires Kwik.Collection.Hashtable
* @requires Kwik.Data.Column
* @requires Kwik.Data.Table
* @constructor
* @created 12:37 AM 7/29/2009
* @modified 12:37 AM 7/29/2009
*/
Kwik.Data.ColumnCollection = function(config)
{
	/** @ignore */
	Kwik.Utility.extend(this, "Kwik.Collections.Hashtable");
	this.__class.push("Kwik.Data.ColumnCollection");

	/** Reference to a parent object @type Kwik.Data.Table */
	this.parent = null;

	/** Add a column to this collection @type Kwik.Data.Column */
	this.add = function ColumnCollection_add(name, column)
	{
		column = column || new Kwik.Data.Column({name: name});
		column.parent = this;
		return this.Kwik$Collections$Hashtable.add(name, column);
	};

	/** Configure this column collection @type Kwik.Data.ColumnCollectionConfig */
	this.configure = function ColumnCollection_configure(config)
	{
		config = this.Kwik$Collections$Hashtable.configure(config);
		if(config.parent){this.parent = config.parent;}
		return config;
	};

	/** @ignore */
	this.main = function ColumnCollection_main(config)
	{
		if(config){this.configure(config);}
	}; this.main(config);
};